/****** Object:  Stored Procedure [dbo].spuserUpdate Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spuserUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spuserUpdate]
GO

/******************************************************************************
**		Name: [dbo].spuserUpdate
**		Desc:
**
**		Return values:
**
**		Called by:
**
**		Parameters:
**		Input						Output
**		----------					----------
**
**		Auth: MinhSong
**		Date: 11/24/2012
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**
*******************************************************************************/

CREATE PROCEDURE [dbo].[spuserUpdate]
(
	@Username nvarchar(50),
	@RoleID int,
	@PhoneNumber nvarchar(20),
	@FullName varchar(50),
	@Address nvarchar(100),
	@BirthDate datetime
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_user]
SET 
	[RoleID] = @RoleID,
	[PhoneNumber] = @PhoneNumber,
	[FullName] = @FullName,
	[Address] = @Address,
	[BirthDate] = @BirthDate
WHERE	[Username] = @Username
GO

--GRANT EXECUTE ON [dbo].[spuserUpdate] TO [sa]
--GO
